﻿<UserControl x:Class="Net.Chirash.Twitter.TweetZone.WindowComponents.StatusBox"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
			 xmlns:my="clr-namespace:Net.Chirash.Twitter.TweetZone.WindowComponents"
             xmlns:my1="clr-namespace:Net.Chirash.Twitter.TweetZone.WindowComponents.MiniControls"
             mc:Ignorable="d" d:DesignHeight="180" d:DesignWidth="300"
             Width="300" Loaded="UserControl_Loaded"
             DataContextChanged="UserControl_DataContextChanged">
	<UserControl.Resources>
		<my:DateTimeConverter x:Key="TimeConverter" />
	</UserControl.Resources>
    <UserControl.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Reply" Name="ReplyMenuItem" Click="ReplyMenuItem_Click" />
            <MenuItem Header="Retweet" Name="RetweetMenuItem" Click="RetweetMenuItem_Click" />
            <MenuItem Header="Delete" Name="DeleteMenuItem" Click="DeleteMenuItem_Click" />
        </ContextMenu>
    </UserControl.ContextMenu>
    <StackPanel>
        <StackPanel>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid Name="ThumbGrid" MouseEnter="ThumbGrid_MouseEnter" MouseLeave="ThumbGrid_MouseLeave" Width="64" Height="64" VerticalAlignment="Top">
                    <Image Height="64" Width="64" Name="ThumbImage" Stretch="Fill" Source="{Binding User.ProfileImageUrl, Mode=TwoWay}" />
                    <my1:StatusOperationPanel Height="64" x:Name="StatusOperationPannel" Width="64" Visibility="Hidden" User="{Binding User}" />
                </Grid>
                <RichTextBox Name="StatusTextBox" Background="{StaticResource DarkBrush}" Foreground="{StaticResource WhiteBrush}" IsReadOnly="True" Width="236" Grid.Column="1" />
            </Grid>
            <StackPanel Orientation="Horizontal" Height="26">
                <Label Content="{Binding User.ScreenName,Mode=TwoWay}" Name="ScreenNameLabel" Width="150" MouseUp="ScreenNameLabel_MouseUp" />
    		    <Label Content="{Binding CreatedAt,Converter={StaticResource TimeConverter}, Mode=TwoWay}" Name="PostedTimeLabel" Width="150" HorizontalContentAlignment="Right" FontSize="9" VerticalContentAlignment="Bottom" />
            </StackPanel>
        </StackPanel>
        <my:UpdateForm x:Name="UpdateForm" Visibility="Collapsed" />
    </StackPanel>
</UserControl>
